<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
<%@ include file="/base/jsp/include.jsp"%>
<style>

</style>
<script type="text/javascript">
    var id = "${id}";
    var submitForm = function($dialog, $grid, $pjq) {
        if ($('form').form('validate')) {
            var obj=sy.serializeObject($('form'));
            var url=sy.contextPath + '/projectMessage/list.do';
            $.post(url, obj, function(result) {
                if (result.code == 0) {
                    $grid.datagrid('reload');
                    $dialog.dialog('destroy');
                } else {
                    $pjq.messager.e('添加失败,'+result.msg);
                }
            }, 'json');
        }
    };
    
    $(function() {
        if (id != '') {
            parent.$.messager.progress({
                text : '数据加载中....'
            });
            $.post(sy.contextPath + '/projectMessage/detail.do', {
                id : id
            }, function(result) {
                if (result) {
                	if(result.isEnable == 1){
                		result.projectState = '项目终止...'
                	}else{
                		if(result.projectState == 0){
                            result.projectState = '项目发布中...'
                        }else if(result.projectState == 1){
                            result.projectState = '可行性分析中...'
                        }else if(result.projectState == 2){
                            result.projectState = '项目对接中...'
                        }else if(result.projectState == 3){
                            result.projectState = '项目公司注册中...'
                        }else if(result.projectState == 4){
                            result.projectState = '运营跟踪解决中...'
                        }else if(result.projectState == 5){
                            result.projectState = '对接终止...'
                        }else if(result.projectState == 6){
                            result.projectState = '跟踪完成...'
                        }else if(result.projectState == 7){
                            result.projectState = '项目终止...'
                        }
                	}
                	
                	
                	
                    $('form').form('load', result);
                }
                parent.$.messager.progress('close');
            }, 'json');
        }
        
        
    });
    
    $(function() {
            $('#deptId').combobox({
                url:sy.contextPath + '/dept/findDeptNo.do',
                valueField:'deptNo',
                textField:'deptName',
                onChange:function(data){
                    console.log(data)
                    $('#userId').combobox({
                        disabled:false,
                        valueField:'id',
                        textField:'nickName',
                        url:sy.contextPath + '/dept/findDeptName.do?id='+data,
                    });
                }
            });
    });    
</script>
</head>
<body>
    <form id="form" method="post">
        <input name="id" type="hidden" />
        <input name="fid" type="hidden" />
        <div style="padding:15px;font-size: 12px">
            <table style="table-layout:fixed;" border="0" cellspacing="0" class="formtable">
                <tr>
                    <th style="width:100px;">发布人：</th>
                    <td>
                        <input class="easyui-textbox" id = "nickName" name = "nickName"  data-options="prompt:'暂无'" readonly="readonly"/>
                    </td>
                    <th style="width:100px;">项目标题：</th>
                    <td>
                        <input class="easyui-textbox" id = "title" name = "title"  data-options="prompt:'暂无'" readonly="readonly"/>
                    </td>            
                </tr>   
                <tr>    
                    <th style="width:100px;">项目状态：</th>
                    <td>
                        <input class="easyui-textbox" id = "projectState" name = "projectState"  data-options="prompt:'暂无'" readonly="readonly"/>
                    </td>
                    <th style="width:100px;">产业类型：</th>
                    <td>
                        <input class="easyui-textbox" id = "cyTypeId" name = "cyTypeId"  data-options="prompt:'暂无'" readonly="readonly"/>
                    </td>
                </tr>
                    
                    <th style="width:100px;">项目投资方：</th>
                    <td>
                        <input class="easyui-textbox" id = "investor" name = "investor"  data-options="prompt:'暂无'" readonly="readonly"/>
                    </td>
                    <th style="width:100px;">项目运营方：</th>
                    <td>
                        <input class="easyui-textbox" id = "operation" name = "operation"  data-options="prompt:'暂无'" readonly="readonly"/>
                    </td>
                <tr>
                    
                    <th style="width:100px;">项目负责人：</th>
                    <td>
                        <input class="easyui-textbox" id = "manager" name = "manager"  data-options="prompt:'暂无'" readonly="readonly"/>
                    </td>
                    <th style="width:100px;">联系电话：</th>
                    <td>
                        <input class="easyui-textbox" id = "phone" name = "phone"  data-options="prompt:'暂无'" readonly="readonly"/>
                    </td>
                </tr>
                <tr>
                    
                    <th style="width:100px;">总投资额：</th>
                    <td>
                        <input class="easyui-textbox" id = "total" name = "total"  data-options="prompt:'暂无'" readonly="readonly"/>万元
                    </td>
                    <th style="width:100px;">载体类型：</th>
                    <td>
                        <input class="easyui-textbox" id = "zaitiTypeName" name = "zaitiTypeName" data-options="prompt:'暂无'"   readonly="readonly"/>
                    </td>
                </tr>
                <tr>                   
                    <th style="width:100px;">需求面积：</th>
                    <td colspan="3">
                        <input class="easyui-textbox" id = "area" name = "area"  data-options="prompt:'暂无'" readonly="readonly"/>㎡
                    </td>
                </tr>
                <tr>
                    <th style="width:100px;" >项目建设内容：</th>
                    <td colspan="3">
                        <input class="easyui-textbox" id = "content" name = "content"  data-options="prompt:'暂无'" readonly="readonly" style="width:100%"/>
                    </td>
                </tr>
                <tr>
                    <th style="width:100px;">可行性分析人员：</th>
                    <td>
                        <input class="easyui-textbox" id = "analyzeMaster" name = "analyzeMaster" data-options="prompt:'暂无'"  readonly="readonly"/>
                    </td>
                    <th style="width:100px;">可行性分析人员账号：</th>
                    <td>
                        <input class="easyui-textbox" id = "analyzeMasterAccount" name = "analyzeMasterAccount" data-options="prompt:'暂无'"   readonly="readonly"/>
                    </td>
                </tr>
                <tr>
                    <th style="width:100px;">项目对接人员：</th>
                    <td>
                        <input class="easyui-textbox" id = "connectMaster" name = "connectMaster" data-options="prompt:'暂无'"   readonly="readonly"/>
                    </td>
                    <th style="width:100px;">项目对接人员账号：</th>
                    <td>
                        <input class="easyui-textbox" id = "connectMasterAccount" name = "connectMasterAccount" data-options="prompt:'暂无'"   readonly="readonly"/>
                    </td>
                </tr>
                <tr>
                    <th style="width:100px;">项目公司注册指派人员：</th>
                    <td>
                        <input class="easyui-textbox" id = "registerMasger" name = "registerMasger" data-options="prompt:'暂无'"   readonly="readonly"/>
                    </td>
                    <th style="width:100px;">项目公司注册指派人员账号：</th>
                    <td>
                        <input class="easyui-textbox" id = "registerMasgerAccount" name = "registerMasgerAccount" data-options="prompt:'暂无'"   readonly="readonly"/>
                    </td>
                </tr>
                <tr>
                    <th style="width:100px;">运营跟踪人员：</th>
                    <td>
                        <input class="easyui-textbox" id = "followMaster" name = "followMaster" data-options="prompt:'暂无'"   readonly="readonly"/>
                    </td>
                    <th style="width:100px;">运营跟踪人员账号：</th>
                    <td>
                        <input class="easyui-textbox" id = "followMasterAccount" name = "followMasterAccount" data-options="prompt:'暂无'"   readonly="readonly"/>
                    </td>
                </tr>
                <tr>
                    <th style="width:100px;">运营跟踪解决人员：</th>
                    <td>
                        <input class="easyui-textbox" id = "resolveMaster" name = "resolveMaster" data-options="prompt:'暂无'"   readonly="readonly"/>
                    </td>
                    <th style="width:100px;">运营跟踪解决人员账号：</th>
                    <td>
                        <input class="easyui-textbox" id = "resolveMasterAccount" name = "resolveMasterAccount" data-options="prompt:'暂无'"   readonly="readonly"/>
                    </td>
                </tr>
            </table>
        </div>
    </form>
</body>
</html>